package written_test;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author zhx
 * @since 2020-09-12
 */
public class VIVO {

    public static void main2(String[] args) {
        // 80
        Scanner in = new Scanner(System.in);
        char[] chars = in.next().toCharArray();
        int left = 0;
        int right = chars.length - 1;
        boolean flag = false;
        int pos_left = 0;
        int pos_right = 0;
        while (right > left) {
            if (chars[left] != chars[right]) {
                flag = true;
                pos_left = left;
                pos_right = right;
                break;
            } else {
                left++;
                right--;
            }
        }
        if (flag) {
            if (check(chars, pos_left)) {
                StringBuilder sb = new StringBuilder();
                sb.append(Arrays.copyOfRange(chars, 0, pos_left));
                sb.append(Arrays.copyOfRange(chars, pos_left + 1, chars.length));
                System.out.println(sb.toString());
                return;
            } else if (check(chars, pos_right)) {
                StringBuilder sb = new StringBuilder();
                sb.append(Arrays.copyOfRange(chars, 0, pos_right));
                sb.append(Arrays.copyOfRange(chars, pos_right + 1, chars.length));
                System.out.println(sb.toString());
                return;
            } else {
                System.out.println(false);
                return;
            }
        } else {
            System.out.println(String.valueOf(chars));
        }
    }

    public static boolean check(char[] chars, int pos) {
        int left = 0;
        int right = chars.length - 1;
        while (right > left) {
            if (left == pos) {
                left++;
                continue;
            }
            if (right == pos) {
                right--;
                continue;
            }
            if (chars[left] == chars[right]) {
                left++;
                right--;
            } else {
                return false;
            }
        }
        return true;
    }


    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input = in.next();
        String[] split = input.split(",");
        
    }

}
